﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>我的首页</title>
</head>
<body onload="load()">
<div class="page-container">
	<p class="f-20 text-success">温氏乳业商城后台管理平台</p>
	<table class="table table-border table-bordered table-bg">
		<thead>
			<tr>
				<th colspan="7" scope="col">信息统计</th>
			</tr>
			<tr class="text-c">
				<th>统计</th>
				<th>用户总数</th>
				<th>订单量</th>
				<th>销售数量</th>
				<th>总金额</th>
			</tr>
		</thead>
		<tbody>
			<tr class="text-c">
				<td>总数</td>
				<td><div id="value1">0</div></td>
				<td><div id="value2">0</div></td>
				<td><div id="value3">0</div></td>
				<td><div id="value4">0</div></td>
			</tr>
		</tbody>
	</table>
</div>
<footer class="footer mt-20">
	<div class="container" >
		<p>本后台系统由<a href="http://www.h-ui.net/" target="_blank" title="H-ui前端框架">H-ui前端框架</a>提供前端技术支持</p>
			<p>广东温氏乳业有限公司信息小组提供技术开发</p>
	</div>
</footer>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="h-ui/js/H-ui.min.js"></script>
<script>
	function load() {
        $.ajax({
			url:"/gettotaldata",
			type:"POST",
			data:{},
			success:function (data) {
			    var usertotal = data["usertotal"];
			    var ordertotal = data["ordertotal"];
			    var saletotal = data["saletotal"];
			    var ordersum = data["ordersum"];
                document.getElementById("value1").innerHTML  = usertotal;
                document.getElementById("value2").innerHTML  = ordertotal;
                document.getElementById("value3").innerHTML  = saletotal;
                document.getElementById("value4").innerHTML  = ordersum;

            },
			error:function (data) {
				alert("请求失败！");
            }
		});
    }

</script>
</body>
</html>